package com.shi.yibanjia.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.shi.yibanjia.entity.po.Publicity;
import com.shi.yibanjia.mapper.PublicityMapper;
import com.shi.yibanjia.service.PublicityService;
import org.springframework.stereotype.Service;

/**
 * @author 20556
 * @description 针对表【tb_publicity(公告表)】的数据库操作Service实现
 * @createDate 2024-04-18 15:29:56
 */
@Service
public class PublicityServiceImpl extends ServiceImpl<PublicityMapper, Publicity>
        implements PublicityService {

    @Override
    public IPage<Publicity> getPublicityPage(Integer page, Integer size) {
        return page(new Page<>(page, size), new LambdaQueryWrapper<Publicity>()
                .orderByDesc(Publicity::getCreateTime));
    }
}




